//
//  UIBarButton-Extension.swift
//  JIMWeiBo
//
//  Created by 陈恒均 on 2018/2/9.
//  Copyright © 2018年 陈恒均. All rights reserved.
//

import UIKit

extension UIBarButtonItem
{
    convenience init(imageName : String) {
        self.init()
        let btn = UIButton()
        
        btn.setImage(UIImage(named: imageName), for: .normal)
        btn.setImage(UIImage(named: imageName + "_highlighted"), for:.highlighted)
        btn.sizeToFit()
        self.customView = btn
        
    }
}
